<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<authz:authorize ifAnyGranted="ROLE_REGISTERED_USER">
    <div style="text-align: right">
        <fmt:message key="app.login.welcome"/>:
        <a href="<c:url value="/viewprofile.form"/>/<authz:authentication operation="username"/>">
            <authz:authentication operation="username"/>
        </a><br>
        (<a href="<c:url value="/j_acegi_logout"/>">
        <fmt:message key="app.logout"/></a>)
    </div>
</authz:authorize>

<authz:authorize ifNotGranted="ROLE_REGISTERED_USER">
    <form action="<c:url value="/j_acegi_security_check"/>" method="post">
        <input type="hidden" name="_acegi_security_remember_me" value="true"/>
        <table border="0" style="max-width: inherit; width: 100%;" cellpadding="0" cellspacing="0">
            <tr>
                <td colspan="2">
                    <fmt:message key="app.login.username"/>
                    :
                </td>
            </tr>
            <tr>
                <td colspan="2"><input style="width: inherit;" class="input-text" type="text" maxlength="20"
                                       name="j_username"/></td>
            </tr>
            <tr>
                <td colspan="2">
                    <fmt:message key="app.login.password"/>
                    :
                </td>
            </tr>
            <tr>
                <td><input class="input-text" type="password" size="15" name="j_password"/></td>
                <td><input type="submit" value="<fmt:message key="app.login.enter"/>"/></td>
            </tr>
        </table>

    </form>
    <fmt:message key="app.login.join.message"/>
    <a href="<c:url value="/join.form"/>">
        <fmt:message key="app.login.join.link"/>
    </a><br/>
</authz:authorize>